package com.kehongborui.spring.entity;

/**
 * @author zhang peng yang ming
 * @CopyRight (C) http://www.csdn.com
 * @brief
 * @email 122162005@qq.com
 * @date 2018-07-26
 */
public class User {
    private String username;
    private String password;
    private int age;
    private boolean flag;
    private Role role;
    private Dept dept;

    public Dept getDept() {
        return dept;
    }

    public void setDept(Dept dept) {
        this.dept = dept;
    }

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    @Override
    public String toString() {
        return "User{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", age=" + age +
                ", flag=" + flag +
                ", role=" + role +
                ", dept=" + dept +
                '}';
    }

    public User(String username, String password, int age, boolean flag, Role role, Dept dept) {
        System.out.println("有参构造");
        this.username = username;
        this.password = password;
        this.age = age;
        this.flag = flag;
        this.role = role;
        this.dept = dept;
    }

    public User() {
        System.out.println("无参构造");
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
